package com.augurit.gzcgwsp.rqqyjyxk.qx.service;

import java.io.InputStream;
import java.util.List;
import java.util.Map;
import com.augurit.common.base.service.ICrudService;
import com.augurit.common.system.web.auth.form.LoginUserForm;
import com.augurit.gzcgwsp.excelimportexport.entity.YwRqQyjyxkCyryzkdjb;
import com.augurit.gzcgwsp.excelimportexport.entity.YwRqQyjyxkGdyjgqjgdjb;
import com.augurit.gzcgwsp.excelimportexport.entity.YwRqQyjyxkPzrqgyzdjb;
import com.augurit.gzcgwsp.excelimportexport.entity.YwRqQyjyxkQysbclmc;
import com.augurit.gzcgwsp.excelimportexport.entity.YwRqQyjyxkRqjszdjb;
import com.augurit.gzcgwsp.excelimportexport.entity.YwRqQyjyxkRqjszrypbqk;
import com.augurit.gzcgwsp.excelimportexport.entity.YwRqQyjyxkRqjszzysb;
import com.augurit.gzcgwsp.excelimportexport.entity.YwRqQyjyxkRqqxdylb;
import com.augurit.gzcgwsp.excelimportexport.entity.YwRqQyjyxkRqqxsbylb;
import com.augurit.gzcgwsp.excelimportexport.entity.YwRqQyjyxkRqqxssdjb;
import com.augurit.gzcgwsp.excelimportexport.entity.YwRqQyjyxkRqssdjb;
import com.augurit.gzcgwsp.excelimportexport.entity.YwRqQyjyxkRypbqk;
import com.augurit.gzcgwsp.excelimportexport.entity.YwRqQyjyxkZyaqjsglryzk;
import com.augurit.gzcgwsp.rqqyjyxk.entity.YwRqQyjyxk;
import com.augurit.gzcgwsp.rqqyjyxk.entity.YwRqQyjyxkFinalCyryzkdjb;
import com.augurit.gzcgwsp.rqqyjyxk.entity.YwRqQyjyxkFinalGdyjgqjgdjb;
import com.augurit.gzcgwsp.rqqyjyxk.entity.YwRqQyjyxkFinalPzrqgyzdjb;
import com.augurit.gzcgwsp.rqqyjyxk.entity.YwRqQyjyxkFinalQysbclmc;
import com.augurit.gzcgwsp.rqqyjyxk.entity.YwRqQyjyxkFinalRqjszdjb;
import com.augurit.gzcgwsp.rqqyjyxk.entity.YwRqQyjyxkFinalRqjszrypbqk;
import com.augurit.gzcgwsp.rqqyjyxk.entity.YwRqQyjyxkFinalRqjszzysb;
import com.augurit.gzcgwsp.rqqyjyxk.entity.YwRqQyjyxkFinalRqqxdylb;
import com.augurit.gzcgwsp.rqqyjyxk.entity.YwRqQyjyxkFinalRqqxsbylb;
import com.augurit.gzcgwsp.rqqyjyxk.entity.YwRqQyjyxkFinalRqqxssdjb;
import com.augurit.gzcgwsp.rqqyjyxk.entity.YwRqQyjyxkFinalRqssdjb;
import com.augurit.gzcgwsp.rqqyjyxk.entity.YwRqQyjyxkFinalRqssylb;
import com.augurit.gzcgwsp.rqqyjyxk.entity.YwRqQyjyxkFinalRypbqk;
import com.augurit.gzcgwsp.rqqyjyxk.entity.YwRqQyjyxkFinalZyaqjsglryzk;
import com.augurit.gzcgwsp.rqqyjyxk.web.form.PzrqgyzdjbForm;
import com.augurit.gzcgwsp.rqqyjyxk.web.form.RqssdjbForm;
import com.augurit.gzcgwsp.rqqyjyxk.web.form.YwRqQyjyxkForm;
import com.augurit.gzcgwsp.rqqyjyxk.web.form.YwRqQyjyxkfbForm;
import com.augurit.gzcgwsp.ssylb.entity.YwRqRqssylb;
import com.augurit.gzcgwsp.ssylb.web.form.YwRqRqssylbForm;
import com.augurit.gzcgwsp.ywcmn.entity.YwComFinalQyxx;
import com.augurit.gzcgwsp.ywcmn.entity.YwComQyxx;

public interface IYwRqQyjyxkQxService extends ICrudService<YwRqQyjyxkForm, Long> {
	public void changeYslState(Long id, Long state,String yslThyy);
	public void changeIsycbl(Long id, String state);
    public void endSave(Long id);
	public YwRqQyjyxkfbForm getYwRqQyjyxkfb(String contextPath,String fbPath,Long id);
	public YwRqQyjyxkfbForm saveYwRqQyjyxkfb(String fbPath, YwRqQyjyxkfbForm ywRqQyjyxkfbForm);
	public List<YwRqQyjyxk> getByAcceptNo(String acceptNo);
	/**
	 * 保存设施一览表
	 * @param ssylbs
	 */
	public void saveSsylbs(List<YwRqRqssylb> ssylbs);
	public void saveSsylb(YwRqQyjyxkForm form,String ssylbid) throws Exception;
	/**
	 * 根据ID删除
	 * @param ssylb
	 */
	public void delSsylb(Long id);
	
	/**
	 * 根据设施id查找
	 * @param id
	 */
	public YwRqRqssylb getSsylb(Long id);
	/**
     * 根据设施id查找设施一览表
     */
    public YwRqQyjyxkForm getSsylbForm(YwRqQyjyxkForm form);
	
	/**
	 * 根据经营企业Id查找设施一览表
	 * @param jyqyid
	 * @return
	 */
	public List<YwRqRqssylb> findSsylbs(Long jyqyid);
	
	/**
	 * 根据案件Id查找excel表格 将其数据转换到数据库中
	 * @param id
	 */
	public  List<YwRqRqssylb> convertExcelToDB(Long id);
	/**
	 * 根据案件id删除设施一览表
	 * @param id
	 */
	public void delSsylbs(Long id);
	
	/**
	 * 通过ID号,改变窗口是否可打印受理通知书状态(1为是；0和空为否)
	 * @param id id号
	 */
	public void changeSendAcceptNotice(Long id);
	
	/**
	 * 通过ID号,改变窗口是否可打印延期办理结果通知书状态(1为是；0和空为否)
	 * @param id 
	 * @return 
	 */
	public void changeSendYqNotice(Long id);
	
	/**
	 * 根据ID获得对象实体
	 * @param id
	 * @return
	 */  
	public YwRqQyjyxk getEntity(Long id);
	
	/**
     * 保存对象实体
     * @param ywRqQyjyxk
     */     
    public void saveEntity(YwRqQyjyxk ywRqQyjyxk);
    /**
     * 创建证书编号
     * @param form
     * @param ssylbid 设施一览表
     * @param type 种类
     */
    public void createZsbh(YwRqQyjyxkForm form,int type,String ssylbid,boolean flag);
    /**
     * 打印时保存经营行政许可证书
     * @param form
     * @param type 表示证书类型1：经营许可证 2：设施许可证3：企业资质证书
     */
    public void saveQyjyxk(YwRqQyjyxkForm form,int type);
    /**
     * 查询企业原始信息
     * @param qyid
     * @return
     */
    public YwComFinalQyxx getYwComFinalQyxx(Long qyid);
    
    /**
     * 导入时候检查收件材料是否存在
     * @param templateCode 模版名称
     * @param id 案件id
     * @return
     */
    public boolean checkData(String templateCode, Long id,Long qyid);
    /**
     * 窗口导入
     * @param map 请求的参数
     * @return
     */
    public String importFinalData(YwRqQyjyxkForm form, Map map);
    
    /**
     * 窗口导入时候检查收件材料是否存在
     * @param qyid
     * @param acceptNo
     * @return
     */
    public YwComQyxx getYwComQyxx(Long qyid, String acceptNo);
    /**
     * 查询设施一览表
     * @param id
     * @param acceptNo
     * @return
     */
    public List<YwRqRqssylb> getSsylbs(Long id, String acceptNo);
    
    /**
     * 查最终数据设施一览表
     * @param qyid
     * @return
     */
    public List<YwRqQyjyxkFinalRqssylb> getFinalSsylbDatas(Long qyid);
    
    /**
     * 查股东股权
     * @param qyid
     * @return
     */
    public   List<YwRqQyjyxkGdyjgqjgdjb>  getGdyjs(Long qyid, String acceptNo);
    /**
     * 查最终数据股东股权
     * @param qyid
     * @return
     */
    public List<YwRqQyjyxkFinalGdyjgqjgdjb> getFinalGdyjs(Long qyid);
    /**
     * 保存股东信息
     * @param entity
     */
    public void saveGdInfos(YwRqQyjyxkGdyjgqjgdjb entity);
    
    /**
     * 获取股东信息
     * @param valueOf
     * @return
     */
    public YwRqQyjyxkGdyjgqjgdjb getGdyj(Long gdId);
    /**
     * 删除股东信息
     * @param valueOf
     */
    public void deleteGdgq(Long gdid);
  
    /**
     * 最终从业人员
     * @param qyid
     * @return
     */
    public List<YwRqQyjyxkFinalCyryzkdjb> getFinalCyrys(Long qyid);
    /**
     * 从业人员
     * @param qyid
     * @param acceptNo
     * @return
     */
    public List<YwRqQyjyxkCyryzkdjb> getCyrys(Long qyid, String acceptNo);
    /**
     * 最终主要安全人员、技术管理
     * @param qyid
     * @param acceptNo
     * @return
     */
    public List<YwRqQyjyxkFinalZyaqjsglryzk> getFinalZyaqjs(Long qyid);
    /**
     * 主要安全人员、技术管理
     * @param qyid
     * @param acceptNo
     * @return
     */
    public List<YwRqQyjyxkZyaqjsglryzk> getZyaqjs(Long qyid, String acceptNo);
    /**
     * //查询最终燃气抢险设备
     * @param qyid
     * @param acceptNo
     * @return
     */
    public List<YwRqQyjyxkFinalRqqxsbylb> getFinalRqqxsbs(Long qyid);
    /**
     * 查询燃气抢险设备
     * @param qyid
     * @param acceptNo
     * @return
     */
    public List<YwRqQyjyxkRqqxsbylb> getRqqxsbs(Long qyid, String acceptNo);
    /**
     * 最终燃气抢险点
     * @param qyid
     * @return
     */
    public List<YwRqQyjyxkFinalRqqxdylb> getFinalRqqxds(Long qyid);
    public List<YwRqQyjyxkRqqxdylb> getRqqxds(Long qyid, String acceptNo);
    /**
     * 最终燃气抢险设施
     * @param qyid
     * @return
     */
    public List<YwRqQyjyxkFinalRqqxssdjb> getFinalRqqxss(Long qyid);
    public List<YwRqQyjyxkRqqxssdjb> getRqqxss(Long qyid, String acceptNo);
    /**
     * 燃气设施供应站
     * @param qyid
     * @return
     */
    public List<YwRqQyjyxkFinalPzrqgyzdjb> getRqqxssGyz(Long qyid);
    public List<YwRqQyjyxkPzrqgyzdjb> getRqqxssGyz(Long qyid, String acceptNo);
    /**
     * 燃气设施登记
     * @param qyid
     * @return
     */
    public List<YwRqQyjyxkFinalRqssdjb> getRqqxssfinalDjbs(Long qyid);
    public List<YwRqQyjyxkRqssdjb> getRqqxssDjbs(Long qyid, String acceptNo);
    
    /**
     * 企业申报材料目录
     * @param qyid
     * @return
     */
    public List<YwRqQyjyxkFinalQysbclmc> getFinalQysbclmc(Long qyid);
    
    /**
     * 
     * @param qyid
     * @return
     */
    public List<YwRqQyjyxkFinalRqjszdjb> getFinalRqjszdjb(Long qyid);
    /**
     * 
     * @param qyid
     * @param acceptNo
     * @return
     */
    public List<YwRqQyjyxkQysbclmc> getQysbclmc(Long qyid, String acceptNo);
    public List<YwRqQyjyxkRqjszdjb> getRqjszdjb(Long qyid);
    /**
     * 
     * @param qyid
     * @return
     */
    public List<YwRqQyjyxkFinalRypbqk> getPzrybqks(Long qyid);
    
    /**
     * 
     * @param qyid
     * @param acceptNo
     * @return
     */
    public List<YwRqQyjyxkRypbqk> getPzrybqks(Long qyid, String acceptNo);
    /**
     * 六、1主要设备
     * @param qyid
     * @param acceptNo
     * @return
     */
    public List<YwRqQyjyxkRqjszzysb> getzysbs(Long qyid, String acceptNo);
    public List<YwRqQyjyxkFinalRqjszzysb> getfinalzysbs(Long qyid);
    
    /**
     * 瓶装燃气供应站登记表人员配备情况
     * @param qyid
     * @param acceptNo
     * @return
     */
    public List<YwRqQyjyxkRqjszrypbqk> getjszrypbqks(Long qyid,
            String acceptNo);
    public List<YwRqQyjyxkFinalRqjszrypbqk> getfinaljszrypbqks(Long qyid);
    
    /**
     * 导入企业证书信息
     * @param map
     * @return
     */
    public Map importFinalQyData(YwRqQyjyxkForm form,Map map);
    /**
     * 获得经营许可
     * @param id
     * @param string
     * @return
     */
    public YwRqQyjyxkForm getJyxk(Long id, String string);
     
    public void saveSsylb(String contextpath,YwRqRqssylbForm form);
    /**
     * 打印时保存副本
     * @param fb
     * @param form
     * @param rqssMap
     * @param pzMap
     */
    public void saveJyxkFb(YwRqQyjyxkfbForm fb, YwRqQyjyxkForm form,
            Map<String, List<RqssdjbForm>> rqssMap,
            Map<String, List<PzrqgyzdjbForm>> pzMap);
    
    /**
     * 构造map
     */
    public Map<String, String> buildMap(YwRqQyjyxkForm form,String zstype);

    /**
     * 套打经营许可副本
     * @param form
     * @param fb
     * @return
     */
    public Map<String, String> createMap(YwRqQyjyxkForm form,
            YwRqQyjyxkfbForm fb);
    
    /**
     * 套打经营许可副本时候写入数据
     * @param form
     * @param fb
     * @param context
     * @return
     */
    public String writeData(YwRqQyjyxkForm form, YwRqQyjyxkfbForm fb,
            String context);
    /**
     * 套打写入经营许可证的数据
     * @param form
     * @param context
     * @return
     */
    public String writeXkzData(YwRqQyjyxkForm form,String context);
    /**
     * 套打写入设施许可标识
     * @param form
     * @param context
     * @return
     */
    public String writeSslybData(YwRqRqssylb ssylb, String context,YwRqQyjyxkForm form);
    /**
     * 检查人员是否在其他企业重复
     * @contextpath 应用服务器的路径
     * @param templateCode 业务编码
     * @param id
     * @param qyid
     * @return
     */
	public String checkPerson(String contextpath,String templateCode, Long id, Long qyid);
	
	/**
	 * 保存设施一览表 附件
	 * @param fjOldName 附件原名
	 * @param fjType 附件类型
	 * @param uploadFile 流
	 * @throws Exception
	 */
	public String uploadSsylbFj(String targetFilePath,String fjOldName,String fjType, InputStream uploadFile)throws Exception;
	
	public void doUpdate(YwRqQyjyxkForm forms);
	/**
	 * 生成正本的证书编号
	 * @param form
	 * @param type
	 * @return
	 */
	public String createCardNo(YwRqQyjyxkForm form, int type);
	/**
	 * 根据单位查实体
	 * @param sqdw
	 */
	public List<YwRqQyjyxk> getEntityBySqdw(String sqdw);
	
	public String wfBusYslTuih(YwRqQyjyxkForm form,LoginUserForm loginUser) throws Exception;
	
	public void getSslbUrl(String contextPath);
}